My Profile_


Client-Side Checkout Page

In order to prepare your client-side checkout page for interacting with Moneris Checkout, you need to do a few tasks first:

  1. Add a call to the Moneris Checkout JavaScript library in a <script> tag:

    Test

    <script src="https://gatewayt.moneris.com/chkt/js/chkt_v1.00.js">

    Production

    <script src="https://gateway.moneris.com/chkt/js/chkt_v1.00.js">

  2. Create a <div> in the HTML:

    <div id="monerisCheckout"></div>

    (Optional): If you are not using the "Full screen" window sizing option, you will need to define the size of your window by creating another <div> around this one, for example:
    <div id="outerDiv" style="width:400px"; height"300px">
    <div id="monerisCheckout"></div>
    </div>

  3. Instantiate the monerisCheckout object and set it up:

    var myCheckout = new monerisCheckout();
    myCheckout.setMode("qa");
    myCheckout.setCheckoutDiv("monerisCheckout");


  4. Set callbacks in JavaScript:

    myCheckout.setCallback("page_loaded", myPageLoad);
    myCheckout.setCallback("cancel_transaction", myCancelTransaction);
    myCheckout.setCallback("error_event", myErrorEvent);
    myCheckout.setCallback("payment_receipt", myPaymentReceipt);
    myCheckout.setCallback("payment_complete", myPaymentComplete);

For more information about callbacks in Moneris Checkout, see Handling Callbacks.